return FALSE;
}
+
+void
+gdk_device_set_timestamp (GdkDevice *device,
+ guint32 timestamp)
+{
+ device->timestamp = timestamp;
+}
+
+/**
+ * gdk_device_get_timestamp:
+ * @device: a `GdkDevice`
+ *
+ * Returns the timestamp of the last activity for this device.
+ *
+ * In practice, this means the timestamp of the last event that was
+ * received from the OS for this device. (GTK may occasionally produce
+ * events for a device that are not received from the OS, and will not
+ * update the timestamp).
+ *
+ * Returns: the timestamp of the last activity for this device
+ *
+ * Since: 4.2
+ */
+guint32
+gdk_device_get_timestamp (GdkDevice *device)
+{
+ return device->timestamp;
+}
GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
double *win_x,
double *win_y);
+
+GDK_AVAILABLE_IN_4_2
+guint32 gdk_device_get_timestamp (GdkDevice *device);
G_END_DECLS
#endif /* __GDK_DEVICE_H__ */
GdkSeat *seat;
GdkDeviceTool *last_tool;
+
+ guint32 timestamp;
};
struct _GdkDeviceClass
GdkAxisUse gdk_device_get_axis_use (GdkDevice *device,
guint index_);
+void gdk_device_set_timestamp (GdkDevice *device,
+ guint32 timestamp);
+
G_END_DECLS
GdkPointerSurfaceInfo *pointer_info = NULL;
GdkDevice *device;
GdkEventType type;
+ guint32 timestamp;
_gdk_display_update_last_event (display, event);
device = gdk_event_get_device (event);
+ timestamp = gdk_event_get_time (event);
if (device)
{
+ if (timestamp != GDK_CURRENT_TIME)
+ gdk_device_set_timestamp (device, timestamp);
+
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD &&
gdk_device_get_source (device) != GDK_SOURCE_TABLET_PAD)
{